<script setup>
import {onMounted, ref} from "vue";

  defineProps(["title", "content", "link"]);
  defineEmits(["titleClick"])
  const viewCount = ref(0);


</script>

<template>
  <div>
    <h1 style="text-align: center;">
      <a :href="link" @click.prevent="$emit('titleClick',title)">{{ title }}</a>
    </h1>
    <article>
      <div style="text-align: center;">
        {{ content.slice(0, 100) }}
      </div>
    </article>
  </div>
</template>

<style scoped>

</style>